package com.chinasofti.sbuilder;

public class Demo02 {
    public static void main(String[] args) {
        StringBuilder sb1 = new StringBuilder();
        StringBuilder sb2 = sb1.append("hello");
        System.out.println("sb1="+sb1);
        System.out.println("sb2="+sb2);
        System.out.println(sb1==sb2);//true
//        sb1.append("12123213");
//        sb1.append(1000);
//        sb1.append("java");
        sb1.append(100).append("java");//链式编程
        System.out.println("sb1="+sb1);
        //反转字符串
        sb1.reverse();
        System.out.println(sb1);
    }
}
